package com.rpay.common.util.http.listener.strategy;

import java.net.URI;


public class PathStrategy implements ListenerStrategy {

    private String host;

    private Integer port;

    private String path;


    public PathStrategy(String host, Integer port,String path) {
        this.host = host;
        this.port = port;
        this.path = path;
    }


    @Override
    public boolean handle(URI uri) {
        if (this.host!=null && this.port!=null && this.path!=null
                && uri.getHost().equals(this.host) && this.port==uri.getPort() && this.path.equals(uri.getPath())) {
            return true;
        }
        return false;
    }
}
